//
//  GHPushLargeVC.m
//  VideoPic
//
//  Created by GH on 16/3/31.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "GHPushLargeVC.h"

@interface GHPushLargeVC ()

@end

@implementation GHPushLargeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor blackColor];
    
    
    UIScrollView *scroll = [[UIScrollView alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:scroll];
    scroll.showsHorizontalScrollIndicator = YES;
    scroll.contentSize = CGSizeMake(self.arrUrl.count * self.view.frame.size.width, 0);
    for (int i = 0; i < self.arrUrl.count; i++) {
        
        CGFloat height = [self.arrHeight[i] floatValue] *([UIScreen mainScreen].bounds.size.width - 40) / [self.arrWidth[i] floatValue];
        
        UIImageView *image = [[UIImageView alloc] initWithFrame:CGRectMake(20 +self.view.frame.size.width *i, 20, self.view.frame.size.width - 40, height)];

        [scroll addSubview:image];
        image.backgroundColor = [UIColor redColor];
    }
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
